#include"drv_exit.h"
void init_exit_9()
{
	GPIO_InitTypeDef Init_Struct;
		EXTI_InitTypeDef Init_exti;
		NVIC_InitTypeDef  NVIC_InitStruct;

	RCC_AHB1PeriphClockCmd( RCC_AHB1Periph_GPIOF,ENABLE);
	Init_Struct.GPIO_Mode=GPIO_Mode_IN;
	Init_Struct.GPIO_Pin=GPIO_Pin_9;
	Init_Struct.GPIO_PuPd=GPIO_PuPd_UP;
	GPIO_Init(GPIOF,&Init_Struct);
//先对选中的GPIO进行初始化

	SYSCFG_EXTILineConfig( EXTI_PortSourceGPIOF, EXTI_PinSource9);
	Init_exti.EXTI_Line=EXTI_Line9;
	Init_exti.EXTI_Mode=EXTI_Mode_Interrupt;
	Init_exti.EXTI_Trigger= EXTI_Trigger_Falling ;
	Init_exti.EXTI_LineCmd=ENABLE;
	EXTI_Init(&Init_exti);
//进行配置外部中断进行配置


	NVIC_Init(&NVIC_InitStruct);
	NVIC_InitStruct.NVIC_IRQChannel=  EXTI9_5_IRQn;
	NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority=1;//抢断
	NVIC_InitStruct.NVIC_IRQChannelSubPriority=0;//响应
	NVIC_InitStruct.NVIC_IRQChannelCmd=ENABLE;
//进行中断配置
}
